Bug 712536 - Themes with gap_(start|end)_file but no actual file crash
authorJehan <jehan@girinstud.io>
Sat, 23 Nov 2013 05:35:18 +0000 (18:35 +1300)
committerJehan <jehan@girinstud.io>
Wed, 4 Dec 2013 11:53:17 +0000 (00:53 +1300)
Code factorization in commit 34fd123 reintroduced bug fixed in 0d396ab
with non-equivalent factorized tests.

modules/engines/pixbuf/pixbuf-rc-style.c

index 57cb3b31e59d1a27c7e60114dbe392161275c7cc..e672f0c23efb32323b48d4dfa77d28a41e9bcdd1 100644 (file)
@@ -765,17 +765,14 @@ theme_parse_image(GtkSettings  *settings,
   if (data->overlay && !data->overlay->filename)
     clear_theme_pixbuf_and_warn (&data->overlay, scanner, "Overlay image options specified without filename");
 
-  if (!data->gap->filename)
-    {
-      if (data->gap)
-        clear_theme_pixbuf_and_warn (&data->gap, scanner, "Gap image options specified without filename");
+  if (data->gap && !data->gap->filename)
+    clear_theme_pixbuf_and_warn (&data->gap, scanner, "Gap image options specified without filename");
 
-      if (data->gap_start)
-        clear_theme_pixbuf_and_warn (&data->gap_start, scanner, "Gap start image options specified without filename");
+  if (data->gap_start && !data->gap_start->filename)
+    clear_theme_pixbuf_and_warn (&data->gap_start, scanner, "Gap start image options specified without filename");
 
-      if (data->gap_end)
-        clear_theme_pixbuf_and_warn (&data->gap_end, scanner, "Gap end image options specified without filename");
-    }
+  if (data->gap_end && !data->gap_end->filename)
+    clear_theme_pixbuf_and_warn (&data->gap_end, scanner, "Gap end image options specified without filename");
 
   if (token != G_TOKEN_RIGHT_CURLY)
     {